<template>
	<view>
		<index-header :scrollTop="scrollTop"></index-header>
		<view style="height: 2000px;">
			<uv-text text="欢迎使用" align="center" color="#333"></uv-text>
			<uv-button text="点击这里开始" @click="go"></uv-button>
		</view>
	</view>
</template>
<script setup>
	import { ref } from 'vue';
	const scrollTop = ref(0);
	import { onPageScroll } from '@dcloudio/uni-app';
	onPageScroll((e) => {
		scrollTop.value = e.scrollTop;
	})

	function go() {
		if (!getApp().globalData.store.hasLogin) {
			uni.$uv.route({
				url: '/login'
			})
		} else {
			uni.$uv.route({
				url: '/chapter'
			})
		}
	}
</script>
<style scoped lang="scss">
</style>